<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8"> 
   <link type="text/css" rel="stylesheet" href="../css/neu_backend.css">
   <title>Wintersporttag - Übersicht</title>
   <script type="text/javascript" src="../java/moomenu.js" ></script>
   <script type="text/javascript" src="../java/e53a815ab435.js" ></script>	
   <script type="text/javascript" src="../java/jquery.min.js" ></script>
   <script type="text/javascript" src="../java/jqFancyTransitions.js"></script>
		
 </head>
  <body>
    
   
    <div class="ausloggen"> <form action="ausloggen.php"><input type="submit" name="auAU" value="Ausloggen"></form></div><img src="../bilder/Alber-Schaeffle-Schule.bmp" alt="Text"/>
      <div class="titel">
	  <div id="slideshow">
	<div class="bild">
	<img  src="../java/images/bild1.jpg" alt="" />
<img src="../java/images/bild2.jpg" alt="" />
<img src="../java/images/bild3.jpg" alt=""  />
<img src="../java/images/bild4.jpg" alt=""  />
<img src="../java/images/bild5.jpg" alt=""  />
<img src="../java/images/bild6.jpg"  alt=""  />
</div>
<script type="text/javascript">
$('#slideshow').jqFancyTransitions({ width: 735, height: 139, delay: 2500, effect: 'fade', direction: 'alternate', stripDelay: 80, strips: 20});
</script>

<script type="text/javascript">
<!--
function FensterWechsel()
{
setTimeout("self.location.href='eig_veranstaltung.php'",3500);
}

function FensterWechsel2()
{
setTimeout("self.location.href='teilnehmer.php'",1000);
}

function FensterWechsel3()
{
setTimeout("self.location.href='backendindex.php'",1000);
}

// -->
</script>

</div>
</div>	
		
		
		
		<div class="navi">
		   			
	    <?php
	    
		$nutzer_back = $_SESSION['kuerzel'];
		if (!$link = mysql_connect ('localhost', 'dennis', 'dennis'))
		{
			echo "Keine Verbindung zu mysql";
			
		}
		if (!mysql_select_db('dennis_schuelerdaten', $link))
		{
			echo "konnte DB nicht finden";
		}

		else
		{		
			
		
		$sql2="SELECT * FROM lehrer WHERE Kuerzel ='$nutzer_back'";
		mysql_query("SET NAMES 'utf8'");
	   	
		$result2 = mysql_query($sql2,$link);
	
		// Erste Zeile holen
		$row2= mysql_fetch_assoc($result2);
		$nutzer_back = $row2['Benutzername'];
		$_SESSION['username'] = $nutzer_back;
	    echo "$nutzer_back";

		if ($nutzer_back == "smv")
		{
			?>
			<a href="willkommensnachricht.php">Willkommensnachricht </a>
			
			<?php
		}
	   ?>
	   <br> <br>
	   <a href="eig_veranstaltung.php" >Eigene Veranstaltung <br/>ansehen</a>
	   <br /><br />
	     
	   	  <a href="veranstaltung.php" >Neue Veranstaltung<br />erstellen</a>
	   <br /><br />
	   <?php
	   if ($nutzer_back == "smv")
	   {
	   ?>
	   <a href="teilnehmer.php" >Eingetragene Schüler</a>
	   <br /><br />
	   <?php
	   }
	   ?>
	   <a href="teilnehmernicht.php" >Nicht eingetragene Schüler<br><br></a>
	   
	   
	   

<script type="text/javascript">
<!--//--><![CDATA[//><!--
var moomenu = { 
    init: function(){
        this.accordion = new Accordion($$('li.menutoggler'), $$('ul.menuaccord'), {
            show: -1            
        });
    }
}
window.addEvent('domready', moomenu.init.bind(moomenu));
var activemenuaccord = -1;

//--><!]]>
</script>
<li class="submenu sibling first menutoggler"><a href="backendindex.php" class="submenu sibling first" onclick="this.blur();" onmouseover="moomenu_display(0)" onmouseout="moomenu_fire()">Veranstaltungen</a>
<ul class="level_2 menuaccord" onmouseover="moomenu_stop()" onmouseout="moomenu_fire()">		 
  
  <?php

	
	
$sql="SELECT * FROM aktivitaeten";
mysql_query("SET NAMES 'utf8'");
	   	
	$result = mysql_query($sql,$link);
	
	// Erste Zeile holen
	$row= mysql_fetch_assoc($result);
	
	while ($row != NULL)
	   {   
	   
	   
	   echo "<li class='last'><a href='aktivitaet.php?aktivitaetsnr=".$row['AktivitaetsNr']."'onclick='this.blur();'>".$row['Aktivitaet']."</a></li>";  
	 
	   // naechste Zeile holen
	   $row= mysql_fetch_assoc($result);
		
	  
	  }
		  
	  }
mysql_close($link);	  

?>

</ul></li>
<!-- count accorditem -->
</div>

</html>